<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html, body{
            height: 100%;
        }
        .container{
            display: flex;
            height: 100%;
            flex-direction: column;
        }
        .top{
            height: 100px;
            background-color: rgb(46, 121, 100);
        }
        .main{
            flex: 1;
            overflow: auto;
        }
        .footer{
            height: 50px;
            background-color: #555;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="top">头部</div>
        <div class="main">主体</div>
        <div class="footer">尾部</div>
    </div>
</body>
</html>